<div class="task-adder-form">
  <form nz-form [formGroup]="taskForm">
    <nz-form-item>
      <nz-form-label nzRequired nzSpan="5">工作名称</nz-form-label>
      <nz-form-control nzSpan="19" nzErrorTip="请输入工作名称">
        <input nz-input formControlName="name">
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label nzRequired nzSpan="5">工作目标</nz-form-label>
      <nz-form-control nzErrorTip="请输入工作目标">
        <input nz-input formControlName="target">
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label nzSpan="5">上级工作</nz-form-label>
      <nz-form-control>
        <nz-tree-select formControlName="parentId" style="width: 100%;" [nzNodes]="taskSelectNode"
          nzVirtualHeight="300px" nzShowSearch nzAllowClear>
        </nz-tree-select>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label nzRequired nzSpan="5">重要程度</nz-form-label>
      <nz-form-control nzErrorTip="请输入工作重要程度">
        <nz-select formControlName="importance" nzAllowClear>
          <nz-option nzValue="0" nzLabel="重要"></nz-option>
          <nz-option nzValue="1" nzLabel="很重要"></nz-option>
        </nz-select>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label nzRequired nzSpan="5">开始时间</nz-form-label>
      <nz-form-control nzErrorTip="请输入工作开始时间">
        <nz-date-picker formControlName="begin" nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss"></nz-date-picker>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label nzRequired nzSpan="5">结束时间</nz-form-label>
      <nz-form-control nzErrorTip="请输入工作结束时间">
        <nz-date-picker formControlName="end" nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss"></nz-date-picker>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label nzSpan="5">属性标签</nz-form-label>
      <nz-form-control>
        <nz-tag *ngFor="let tag of adderTags" (nzOnClose)="handleAdderTagerClose(tag)" [nzMode]="'closeable'">
          {{ sliceTagName(tag) }}
        </nz-tag>
        <nz-tag *ngIf="!tagInputVisible" class="editable-tag" nzNoAnimation (click)="showTagInput()">
          <i nz-icon nzType="plus"></i>
          New Tag
        </nz-tag>
        <input #inputElement nz-input nzSize="small" *ngIf="tagInputVisible" [ngModelOptions]="{standalone: true}"
          type="text" [(ngModel)]="tagInputValue" style="width: 78px;" (blur)="handleTagInputConfirm()"
          (keydown.enter)="handleTagInputConfirm()" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label nzSpan="5">工作描述</nz-form-label>
      <nz-form-control>
        <textarea nz-input formControlName="description"></textarea>
      </nz-form-control>
    </nz-form-item>
  </form>
</div>
